home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / SoftBevelBorderBeanInfo.java < prev    next >
Text File  |  1998-10-21  |  3KB  |  71 lines

  1. package com.symantec.itools.swing.borders;
  2.  
  3. import java.beans.*;
  4. import com.symantec.itools.vcafe.beans.PropertyDescriptorAttributes;
  5. import com.symantec.itools.vcafe.beans.PropertyHelpIDs;
  6.  
  7. public final class SoftBevelBorderBeanInfo
  8.     extends BorderBeanInfo
  9. {
  10.     public SoftBevelBorderBeanInfo()
  11.     {
  12.         super();
  13.         
  14.         set16x16ColorIconName("SoftBevelBorder.gif");
  15.     }
  16.     
  17.     protected Class getBeanClass()
  18.     {
  19.         return SoftBevelBorder.class;
  20.     }
  21.     
  22.     public PropertyDescriptor[] getPropertyDescriptors()
  23.     {
  24.         try
  25.         {
  26.             Class beanClass = getBeanClass();
  27.             
  28.             PropertyDescriptor bevelTypePD = new PropertyDescriptor("bevelType", beanClass);
  29.             bevelTypePD.setPropertyEditorClass(BevelTypePropertyEditor.class);
  30.             bevelTypePD.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.SOFTBEVELBORDER_BEVEL_TYPE_HELP_ID));
  31.             
  32.             PropertyDescriptor highlightOuterColor = new PropertyDescriptor("highlightOuterColor", beanClass);
  33.             highlightOuterColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.SOFTBEVELBORDER_HIGHLIGHT_OUTER_COLOR_HELP_ID));
  34.             
  35.             PropertyDescriptor highlightInnerColor = new PropertyDescriptor("highlightInnerColor", beanClass);
  36.             highlightInnerColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.SOFTBEVELBORDER_HIGHLIGHT_INNER_COLOR_HELP_ID));
  37.             
  38.             PropertyDescriptor shadowInnerColor = new PropertyDescriptor("shadowInnerColor", beanClass);
  39.             shadowInnerColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.SOFTBEVELBORDER_SHADOW_INNER_COLOR_HELP_ID));
  40.             
  41.             PropertyDescriptor shadowOuterColor = new PropertyDescriptor("shadowOuterColor", beanClass);
  42.             shadowOuterColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.SOFTBEVELBORDER_SHADOW_OUTER_COLOR_HELP_ID));
  43.             
  44.             PropertyDescriptor[] rv = {
  45.                     bevelTypePD,
  46.                     highlightOuterColor,
  47.                     highlightInnerColor,
  48.                     shadowInnerColor,
  49.                     shadowOuterColor };
  50.             
  51.             return rv;
  52.         }
  53.         catch(IntrospectionException e)
  54.         {
  55.             e.printStackTrace();
  56.         }
  57.         
  58.         //Error, return no properties
  59.         return new PropertyDescriptor[0];
  60.     }
  61.  
  62.     protected void modifyBeanDescriptor(BeanDescriptor beanDescriptor)
  63.     {
  64.         super.modifyBeanDescriptor(beanDescriptor);
  65.         
  66.         beanDescriptor.setValue("WINHELP", winHelpID);
  67.     }
  68.     
  69.     protected final static String winHelpID = "0x60132";
  70. }
  71.